assume cs:code

code segment
	start: mov ax, 0
		   mov es, ax 
		   mov di, 200h
		   
		   mov ax, cs
		   mov ds, ax 
		   mov si, offset do0
		   
		   ;拷贝do0到中断向量表0：200处
		   mov cx, offset do0end-offset do0
		   cld
		   rep movsb
		   
		   ;设置中断向量表
		   mov ax, 0
		   mov es, ax
		   mov word ptr es:[0*4], 200h
		   mov word ptr es:[0*4+2], 0
		   
		   ;mov ax, 1000h
		   ;mov bh, 1
		   ;div bh
		   
		   mov ax, 4c00h
		   int 21h
		   
	do0: jmp short show
		 db "overflow!"
   show: mov ax, 0b800h
   		 mov es, ax
   		 mov di, 12*160+36*2  ;定位显存中的位置
   		 
   		 mov ax, cs
   		 mov ds, ax
   		 mov si, 202h	;定位到字符串
   		 
   		 mov cx, 9
   	s:   mov al, [si]	;显示字符串
   		 mov es:[di], al
   		 inc si
   		 add di, 2
   		 loop s 
   		 
   		 mov ax, 4c00h
   		 int 21h
   		 
   do0end:nop
code ends
end start 
   		 